<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<form action="bd.php" method="get">
    请输入你想翻译的内容<input type="text" name="username" id="username">
    <select name="name" id="name">
        <option value="kor">韩文</option>
        <option value="zh">中文</option>
        <option value="fra">法语</option>
        <option value="spa">西班牙语</option>
        <option value="th">泰语</option>
        <option value="swe">瑞典语</option>
        <option value="cht">繁体中文</option>
        <option value="wyw">文言文</option>
    </select>
    <input type="button" value="翻译" onclick="fun1()"><span></span>
</form>
</body>
</html>
<script src="jquery-2.1.4.min.js"></script>
<script>
   function fun1()
   {
//       alert(1);
       var username=document.getElementById('username').value;
       var name=document.getElementById('name').value;
       var ajax=new XMLHttpRequest();
       ajax.onreadystatechange=function()
       {
           if(ajax.readyState==4&&ajax.status==200)
           {
              $("span").text(ajax.responseText);
           }
       }
       ajax.open('get','bd.php?username='+username+'&name='+name);
       ajax.send();

   }

</script>